import { Column, Entity, PrimaryColumn } from "typeorm";
import { ManualTimestamp } from "../decorators/manual-timestamp.decorator";

@Entity("map_sites")
@ManualTimestamp()
export class MapSiteEntity {
  @PrimaryColumn({ type: "int", comment: "地点ID" })
  id!: number;

  @Column({ type: "varchar", length: 100, comment: "地点名称" })
  name!: string;

  @Column({ type: "int", comment: "活动ID" })
  act_id!: number;

  @Column({ type: "int", comment: "区域ID" })
  area_id!: number;

  @Column({ type: "int", comment: "图片类型" })
  img_type!: number;

  @Column({ type: "int", default: 0, comment: "数量" })
  num!: number;

  @Column({ type: "int", default: 0, comment: "状态值" })
  ss!: number;

  @Column({ type: "int", comment: "类型ID" })
  type_id!: number;

  @Column("datetime", { name: "created_at", comment: "创建时间" })
  created_at!: Date;

  @Column("datetime", { name: "updated_at", nullable: true, comment: "更新时间" })
  updated_at!: Date | null;
}
